# !/usr/bin    python3
# encoding:    utf-8 -*-
# @file        : checkout_params_apis.py
# @author      : 加强 jqlin
# @Time        : 2025/9/30 13:57
# @Copyright:  : 接口自动化
from api.base_api import BaseBuyerApi


class SetOrderAddressIdApi(BaseBuyerApi):

    def __init__(self, address_id):
        super().__init__()
        self.url = f'{self.host}/trade/checkout-params/addressid/{address_id}'
        self.method = 'post'


class SetOrderPayTypeApi(BaseBuyerApi):

    def __init__(self, payment_type='COD'):
        super().__init__()
        self.url = f'{self.host}/trade/checkout-params/payment-type'
        self.method = 'post'
        self.data = {
            "payment_type": payment_type
        }
